<template>
  <ul>
    <template v-for="item in navList">
      <li>{{ item.name }}</li>
      <RootNav v-if="'children' in item" :navList="item.children" />
    </template>
    <!-- <li v-for="item in navList">
      {{ item.name }}
      <RootNav
        v-if="item.children && item.children.length"
        :navList="item.children"
      />
    </li> -->
  </ul>
</template>

<script setup>
import {} from "vue";
defineProps({
  navList: {
    type: Array,
    default: () => [],
  },
});
</script>

<style lang="scss" scoped></style>
